-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(router/atc): remove unnecessary tb_nkeys() #13043
Conversation
I checked the code in @hanshuebner , I think that you introduced this check before, do you have some opnions? |
Yes, I was wondering the same. We have a lot of other places in code too where we have asserts like we don’t trust the input (here it happens in a loop). If we error here it leads most probably to issue where router is never build, but we have cleaner error message. But this probably never happens. I would say that if you have 10000 routes and one of then errors in this, it is still better to have new router. Thus logging this rare/imposdible case would be softer, but I am fine removing it altogether. |
The |
Though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function split_routes_and_services_by_path
was called when rebuilding router, this is not the hot path when proxying.
Doing this kind of assertion for robustness when rebuilding router is acceptable for me.
�Close due to ADD-SP's comment |
Summary
KAG-4138
Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
Fix #[issue number]